<template>
	<!-- 轮播图 -->
	<swiper class="swiper" circular :indicator-dots="true" :autoplay="true">
		<swiper-item v-for="(item, index) in swiperList" :key="item.id">
			<view class="swiper-item">
				<image :src="item.image" class="swiperItemImage" mode="aspectFill" @click="gotoPath(item)"></image>
			</view>
		</swiper-item>
	</swiper>
</template>

<script>
export default {
	name: 'hwxcSwiper',
	props:{
		swiperList:{
			type:Array,
			default:()=>[]
		}
	},
	data() {
		return {
			gotoPath(info){
				uni.navigateTo({
					url:info.url
				})
			}
		};
	},
};
</script>

<style scoped lang="scss">
.swiper {
	height: 300rpx;
	overflow: hidden;
	border-radius: 8rpx;
	background-color: #fff;
}

.swiper-item {
	display: block;
	height: 300rpx;
	line-height: 300rpx;
	text-align: center;
}

.swiperItemImage {
	width: 100%;
	border-radius: 8rpx;
	height: 300rpx;
}
</style>
